{% load static %}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>{% block title %}{% endblock %}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="{% static 'plugins/fontawesome-free/css/all.min.css' %}">
    <link rel="stylesheet" href="{% static 'dist/css/adminlte.min.css' %}">
    <link rel="stylesheet" href="{% static 'plugins/sweetalert2-theme-bootstrap-4/bootstrap-4.min.css' %}">
    <link rel="stylesheet" href="{% static 'plugins/datatables-bs4/css/dataTables.bootstrap4.min.css' %}">
    <link rel="stylesheet" href="{% static 'plugins/datatables-responsive/css/responsive.bootstrap4.min.css' %}">
    <link rel="stylesheet" href="{% static 'dist/css/fileinput.min.css' %}">
    <link rel="stylesheet" href="{% static 'dist/js/themes/explorer-fas/theme.css' %}" media="all" type="text/css"/>
    {% block link %}
    {% endblock %}
</head>
<body class="hold-transition sidebar-mini">
<div class="wrapper">
    <nav class="main-header navbar navbar-expand navbar-white navbar-light">
        <ul class="navbar-nav">
            <li class="nav-item">
                <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
            </li>
            <li class="nav-item d-none d-sm-inline-block">
                <a href="{% url 'index' %}" class="nav-link">首页</a>
            </li>
        </ul>
        <ul class="navbar-nav ml-auto">
            <li class="nav-item">
                <a class="nav-link" href="{% url 'logout' %}">退出登录</a>
            </li>
        </ul>
    </nav>

    <aside class="main-sidebar sidebar-dark-primary elevation-4">
        <a href="{% url 'index' %}" class="brand-link">
            <img src="{% static 'dist/img/AdminLTELogo.png' %}"
                 alt="AdminLTE Logo"
                 class="brand-image img-circle elevation-3"
                 style="opacity: .8">
            <span class="brand-text font-weight-light">超市进销存管理系统</span>
        </a>
        <div class="sidebar">
            <div class="user-panel mt-3 pb-3 mb-3 d-flex">

                <div class="info">
                      <a href="#" class="d-block">{{ request.session.currentUser.username }}</a>
                </div>
            </div>
            <nav class="mt-2">
                <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
                    data-accordion="false">
                    <li class="nav-item">
                        <a href="{% url 'index' %}" class="nav-link">
                            <i class="nav-icon fas fa-th"></i>
                            <p>首页</p>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="{% url 'user_info' %}" class="nav-link">
                            <i class="nav-icon fas fa-user"></i>
                            <p>个人信息</p>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="{% url 'change_password' %}" class="nav-link">
                            <i class="nav-icon fas fa-lock"></i>
                            <p>修改密码</p>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="{% url 'user_list' %}" class="nav-link">
                            <i class="nav-icon fas fa-users"></i>
                            <p>用户管理</p>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="{% url 'customer_list' %}" class="nav-link">
                            <i class="nav-icon fas fa-users"></i>
                            <p>客户管理</p>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="{% url 'good_list' %}" class="nav-link">
                            <i class="nav-icon fas fa-box"></i>
                            <p>商品管理</p>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="{% url 'employee_list' %}" class="nav-link">
                            <i class="nav-icon fas fa-user-tie"></i>
                            <p>员工管理</p>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="{% url 'member_list' %}" class="nav-link">
                            <i class="nav-icon fas fa-user-tie"></i>
                            <p>会员管理</p>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="{% url 'pay_main_list' %}" class="nav-link">
                            <i class="nav-icon fas fa-shopping-cart"></i>
                            <p>采购管理</p>
                        </a>
                    </li>
                </ul>
            </nav>
        </div>
    </aside>

    <div class="content-wrapper">
        <section class="content">
            <div class="container-fluid">
                <div class="row pt-5">
                    {% block main %}
                    {% endblock %}
                </div>
            </div>
        </section>
    </div>
    <footer class="main-footer">
        <div class="float-right d-none d-sm-block">
            <b>版本</b> 1.0.0
        </div>
        <strong>Copyright &copy; 2022-2023 <a href="#">超市进销存管理系统</a>.</strong> 保留所有
        权利。
    </footer>

    <aside class="control-sidebar control-sidebar-dark">
    </aside>
</div>

<script src="{% static 'plugins/jquery/jquery.min.js' %}"></script>
<script src="{% static 'plugins/bootstrap/js/bootstrap.bundle.min.js' %}"></script>
<script src="{% static 'plugins/bs-custom-file-input/bs-custom-file-input.min.js' %}"></script>
<script src="{% static 'plugins/sweetalert2/sweetalert2.min.js' %}"></script>
<script src="{% static 'plugins/jquery-validation/jquery.validate.min.js' %}"></script>
<script src="{% static 'plugins/jquery-validation/additional-methods.min.js' %}"></script>
<script src="{% static 'plugins/datatables/jquery.dataTables.min.js' %}"></script>
<script src="{% static 'plugins/datatables-bs4/js/dataTables.bootstrap4.min.js' %}"></script>
<script src="{% static 'plugins/datatables-responsive/js/dataTables.responsive.min.js' %}"></script>
<script src="{% static 'plugins/datatables-responsive/js/responsive.bootstrap4.min.js' %}"></script>
<script src="{% static 'dist/js/fileinput.min.js' %}" type="text/javascript"></script>
<script src="{% static 'dist/js/themes/fas/theme.js' %}" type="text/javascript"></script>
<script src="{% static 'dist/js/plugins/piexif.js' %}" type="text/javascript"></script>
<script src="{% static 'dist/js/plugins/sortable.js' %}" type="text/javascript"></script>
<script src="{% static 'dist/js/zh.js' %}" type="text/javascript"></script>
<script src="{% static 'dist/js/themes/explorer-fas/theme.js' %}" type="text/javascript"></script>
<script src="{% static 'dist/js/adminlte.min.js' %}"></script>

{% block script %}
{% endblock %}
<script type="text/javascript">
    $(document).ready(function () {
        bsCustomFileInput.init();
    });
</script>
</body>
</html>
